package com.example.salesservice.mapper;

import com.example.salesservice.entity.Sales;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface SalesImp {
	//查询所有销售信息（或根据条件进行筛选查询）
	public List<Sales> select(@Param("customerid")Integer customerid, @Param("goodsid")Integer goodsid, @Param("index")Integer index, @Param("limit")Integer limit);
	//增
	public void insert(@Param("customerid")Integer customerid,@Param("paytype")String paytype,@Param("salestime")Date salestime,@Param("operateperson")String operateperson,
			@Param("number")Integer number,@Param("remark")String remark,@Param("saleprice")Double saleprice,@Param("goodsid")Integer goodsid);
	//改
	public void update(@Param("id")Integer id,@Param("customerid")Integer customerid,@Param("paytype")String paytype,@Param("salestime")Date salestime,@Param("operateperson")String operateperson,
			@Param("number")Integer number,@Param("remark")String remark,@Param("saleprice")Double saleprice,@Param("goodsid")Integer goodsid);
	//删
	public void delete(Integer id);
	//根据id进行指定查询
	public Sales selectById(Integer id);
	//根据id 更新number属性
	public void updateNumber(@Param("id")Integer id,@Param("number")Integer number);
}
